package com.learn.mail.service;

import com.learn.mail.enums.MailTemplateType;

import java.io.File;
import java.util.List;
import java.util.Map;

public interface SendEmailService {


    void sendTemplateMail(String to, String subject, String templatePath, Map<String, Object> model) throws Exception;


    void sendWithAttachment(String to, String subject, String content, File attachment);

    void sendHtmlMailAsync(String to, String subject, MailTemplateType templateType, Map<String, Object> params);

    /**
     * 批量邮件发送
     *
     * @param to       收件人
     * @param subject  主题
     * @param template 邮件模板
     * @param params   封装参数
     * @return
     * @throws
     * @author MI
     * @date 2025/7/28 11:01
     */
    void sendBatchEmails(List<String> to, String subject, String template, Map<String, Object> params);

}
